package test.core.structs;

import hyl.core.struct.MyCircle;

public class testcircle {
  public static void main(String[] args) {
	  test1();
  }
  public static void test1() {
	  MyCircle<Integer> mc=new MyCircle<>(1000);
	  new Thread(()->{
		  for(int i=0;i<9000;) {
			  Integer t=mc.getNew();
			  if (t==null )continue;
			  System.out.println(t);
			  i++;
			
		  }
	  }) .start();
	
	  new Thread(()->{
		  for(int i=0;i<900;i++) {
			  mc.add(i);
			  System.out.println("n="+i);
		  }
	  }) .start();
	
	 
	
	  
  }
}
